<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
    Document   : index.xhtml
    Created on : 1st April2014
    Author     :Ihab Ali
-->
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui" >
     

    <body>

        <ui:composition template="./WEB-INF/templates/template.xhtml">

            <ui:define name="content">
               
                <h:form id="loginForm" >
                    <p:growl id="growl" showSummary="false"  sticky="true"  showDetail="true"/>
                    <p:layout id="mainContent" style="height: 110px; font-size: x-small">
                        <p:layoutUnit id="northLay" position="center" >
                           <p:panelGrid columns="2">
                               <p:outputLabel for="userName" value="#{messages.userNameLabel}" />
                                <p:inputText id ="userName" required="true" value="#{login.userName}" />
                                <p:outputLabel for="password" value="#{messages.passwordLabel}" />
                                <p:password id ="password"  required="true"  value="#{login.passowrd}"/>
                                <p:commandButton id="loginButton" value="#{messages.loginLabel}"  update="loginForm , growl"  action="#{login.login()}"/>
                            </p:panelGrid>
                        </p:layoutUnit>
                    </p:layout>
                </h:form>

     </ui:define>
  </ui:composition>
 </body>
</html>
